package chtp11;
import java.util.Scanner;

/*
class Account{
	private int balance;
	
	public Account(int balance)
	 {
		this.balance = balance;
	}
	public int getBalance() {
		return balance;
	}
	public synchronized void deposit(int money){
		balance += money; 
	}
	public synchronized void withdraw(int money){
		balance -= money; 
	}
}*/

public class Main6_4 {
 
}





//201621123037
class Account{
	private int balance;
	
	public Account(int balance)
	 {
		this.balance = balance;
	}
	public int getBalance() {
		return balance;
	}
	public void deposit(int money){
		synchronized(this) {
			balance += money; 
		}
		
	}
	public void withdraw(int money){
		synchronized(this) {
			balance -= money; 
		}
	}
}
